#include <testngpp/internal/TestCase.h>
#include <testngpp/internal/TestFixtureDesc.h>
#include <testngpp/internal/TestSuiteDesc.h>
#include <testngpp/internal/DataDriven.h>
#include "TestRectangle.h"

static struct TESTCASE_TestRect_test_11
   : public TESTNGPP_NS::TestCase
{
   TESTCASE_TestRect_test_11()
      : TESTNGPP_NS::TestCase
        ( "should be able to calculate area: 2.4*3=7.2"
        , "Rect"
        , "TestRectangle"
        , 0
        , "TestRectangle.h"
        , 11)
   {}

   void setFixture(TESTNGPP_NS::TestFixture* fixture)
   {
      if(fixture == 0)
      {
         belongedFixture = new TestRect();
      }
      else
      {
         belongedFixture = dynamic_cast<TestRect*>(fixture);
      }
   }

   void runTest()
   {
      
belongedFixture->test_11()
;
   }

   TESTNGPP_NS::TestFixture* getFixture() const
   {
      return belongedFixture;
   }

   unsigned int numberOfTags() const
   {
      return 0;
   }

   const char** getTags() const
   {
      static const char* tags[] = {0};
      return tags;
   }

private:
   TestRect* belongedFixture;
} testcase_instance_TestRect_test_11 ;



static struct TESTCASE_TestRect_test_16
   : public TESTNGPP_NS::TestCase
{
   TESTCASE_TestRect_test_16()
      : TESTNGPP_NS::TestCase
        ( "should be able to calculate perimeter: 2*(2.4+3)=10.8"
        , "Rect"
        , "TestRectangle"
        , 0
        , "TestRectangle.h"
        , 16)
   {}

   void setFixture(TESTNGPP_NS::TestFixture* fixture)
   {
      if(fixture == 0)
      {
         belongedFixture = new TestRect();
      }
      else
      {
         belongedFixture = dynamic_cast<TestRect*>(fixture);
      }
   }

   void runTest()
   {
      
belongedFixture->test_16()
;
   }

   TESTNGPP_NS::TestFixture* getFixture() const
   {
      return belongedFixture;
   }

   unsigned int numberOfTags() const
   {
      return 0;
   }

   const char** getTags() const
   {
      static const char* tags[] = {0};
      return tags;
   }

private:
   TestRect* belongedFixture;
} testcase_instance_TestRect_test_16 ;



static struct TESTCASE_TestRect_test_21
   : public TESTNGPP_NS::TestCase
{
   TESTCASE_TestRect_test_21()
      : TESTNGPP_NS::TestCase
        ( "should be able to set width: 75"
        , "Rect"
        , "TestRectangle"
        , 0
        , "TestRectangle.h"
        , 21)
   {}

   void setFixture(TESTNGPP_NS::TestFixture* fixture)
   {
      if(fixture == 0)
      {
         belongedFixture = new TestRect();
      }
      else
      {
         belongedFixture = dynamic_cast<TestRect*>(fixture);
      }
   }

   void runTest()
   {
      
belongedFixture->test_21()
;
   }

   TESTNGPP_NS::TestFixture* getFixture() const
   {
      return belongedFixture;
   }

   unsigned int numberOfTags() const
   {
      return 0;
   }

   const char** getTags() const
   {
      static const char* tags[] = {0};
      return tags;
   }

private:
   TestRect* belongedFixture;
} testcase_instance_TestRect_test_21 ;



static TESTNGPP_NS::TestCase* g_TESTCASEARRAY_TestRect[] = {
&testcase_instance_TestRect_test_11,
&testcase_instance_TestRect_test_16,
&testcase_instance_TestRect_test_21,
0
};




static struct TESTCASE_TestRect_OutOfRange_test_30
   : public TESTNGPP_NS::TestCase
{
   TESTCASE_TestRect_OutOfRange_test_30()
      : TESTNGPP_NS::TestCase
        ( "should be able to identify abnormal rectangle setting: width < 0"
        , "Rect_OutOfRange"
        , "TestRectangle"
        , 0
        , "TestRectangle.h"
        , 30)
   {}

   void setFixture(TESTNGPP_NS::TestFixture* fixture)
   {
      if(fixture == 0)
      {
         belongedFixture = new TestRect_OutOfRange();
      }
      else
      {
         belongedFixture = dynamic_cast<TestRect_OutOfRange*>(fixture);
      }
   }

   void runTest()
   {
      
belongedFixture->test_30()
;
   }

   TESTNGPP_NS::TestFixture* getFixture() const
   {
      return belongedFixture;
   }

   unsigned int numberOfTags() const
   {
      return 0;
   }

   const char** getTags() const
   {
      static const char* tags[] = {0};
      return tags;
   }

private:
   TestRect_OutOfRange* belongedFixture;
} testcase_instance_TestRect_OutOfRange_test_30 ;



static struct TESTCASE_TestRect_OutOfRange_test_35
   : public TESTNGPP_NS::TestCase
{
   TESTCASE_TestRect_OutOfRange_test_35()
      : TESTNGPP_NS::TestCase
        ( "should be able to identify abnormal rectangle setting: width < 0"
        , "Rect_OutOfRange"
        , "TestRectangle"
        , 0
        , "TestRectangle.h"
        , 35)
   {}

   void setFixture(TESTNGPP_NS::TestFixture* fixture)
   {
      if(fixture == 0)
      {
         belongedFixture = new TestRect_OutOfRange();
      }
      else
      {
         belongedFixture = dynamic_cast<TestRect_OutOfRange*>(fixture);
      }
   }

   void runTest()
   {
      
belongedFixture->test_35()
;
   }

   TESTNGPP_NS::TestFixture* getFixture() const
   {
      return belongedFixture;
   }

   unsigned int numberOfTags() const
   {
      return 0;
   }

   const char** getTags() const
   {
      static const char* tags[] = {0};
      return tags;
   }

private:
   TestRect_OutOfRange* belongedFixture;
} testcase_instance_TestRect_OutOfRange_test_35 ;



static struct TESTCASE_TestRect_OutOfRange_test_41
   : public TESTNGPP_NS::TestCase
{
   TESTCASE_TestRect_OutOfRange_test_41()
      : TESTNGPP_NS::TestCase
        ( "should be able to identify abnormal rectangle setting: height < 0"
        , "Rect_OutOfRange"
        , "TestRectangle"
        , 0
        , "TestRectangle.h"
        , 41)
   {}

   void setFixture(TESTNGPP_NS::TestFixture* fixture)
   {
      if(fixture == 0)
      {
         belongedFixture = new TestRect_OutOfRange();
      }
      else
      {
         belongedFixture = dynamic_cast<TestRect_OutOfRange*>(fixture);
      }
   }

   void runTest()
   {
      
belongedFixture->test_41()
;
   }

   TESTNGPP_NS::TestFixture* getFixture() const
   {
      return belongedFixture;
   }

   unsigned int numberOfTags() const
   {
      return 0;
   }

   const char** getTags() const
   {
      static const char* tags[] = {0};
      return tags;
   }

private:
   TestRect_OutOfRange* belongedFixture;
} testcase_instance_TestRect_OutOfRange_test_41 ;



static struct TESTCASE_TestRect_OutOfRange_test_46
   : public TESTNGPP_NS::TestCase
{
   TESTCASE_TestRect_OutOfRange_test_46()
      : TESTNGPP_NS::TestCase
        ( "should be able to identify abnormal rectangle setting: height < 0"
        , "Rect_OutOfRange"
        , "TestRectangle"
        , 0
        , "TestRectangle.h"
        , 46)
   {}

   void setFixture(TESTNGPP_NS::TestFixture* fixture)
   {
      if(fixture == 0)
      {
         belongedFixture = new TestRect_OutOfRange();
      }
      else
      {
         belongedFixture = dynamic_cast<TestRect_OutOfRange*>(fixture);
      }
   }

   void runTest()
   {
      
belongedFixture->test_46()
;
   }

   TESTNGPP_NS::TestFixture* getFixture() const
   {
      return belongedFixture;
   }

   unsigned int numberOfTags() const
   {
      return 0;
   }

   const char** getTags() const
   {
      static const char* tags[] = {0};
      return tags;
   }

private:
   TestRect_OutOfRange* belongedFixture;
} testcase_instance_TestRect_OutOfRange_test_46 ;



static TESTNGPP_NS::TestCase* g_TESTCASEARRAY_TestRect_OutOfRange[] = {
&testcase_instance_TestRect_OutOfRange_test_30,
&testcase_instance_TestRect_OutOfRange_test_35,
&testcase_instance_TestRect_OutOfRange_test_41,
&testcase_instance_TestRect_OutOfRange_test_46,
0
};




/*static*/ TESTNGPP_NS::TestFixtureDesc test_fixture_desc_instance_TestRect
   ( "Rect"
   , "TestRectangle.h"
   , g_TESTCASEARRAY_TestRect
   , (sizeof(g_TESTCASEARRAY_TestRect)/sizeof(g_TESTCASEARRAY_TestRect[0])) - 1
   );



/*static*/ TESTNGPP_NS::TestFixtureDesc test_fixture_desc_instance_TestRect_OutOfRange
   ( "Rect_OutOfRange"
   , "TestRectangle.h"
   , g_TESTCASEARRAY_TestRect_OutOfRange
   , (sizeof(g_TESTCASEARRAY_TestRect_OutOfRange)/sizeof(g_TESTCASEARRAY_TestRect_OutOfRange[0])) - 1
   );



static TESTNGPP_NS::TestFixtureDesc* array_of_fixture_desc_TestRectangle[] = {
&test_fixture_desc_instance_TestRect,
&test_fixture_desc_instance_TestRect_OutOfRange,
0
};




static TESTNGPP_NS::TestSuiteDesc test_suite_desc_instance_TestRectangle
   ( "TestRectangle"
   , array_of_fixture_desc_TestRectangle
   , (sizeof(array_of_fixture_desc_TestRectangle)/sizeof(array_of_fixture_desc_TestRectangle[0])) - 1
   );



extern "C" DLL_EXPORT TESTNGPP_NS::TestSuiteDesc* ___testngpp_test_suite_desc_getter() {
   return &test_suite_desc_instance_TestRectangle;
}


